<template>
	<view class="page">
		<view class="main_box" v-for="(item,index) in Table_List" :key="index" @click="detail(item.Content)">
			<span class="sp_1">{{item.Title}}</span>
			<span class="sp_2">{{item.UserName}}</span>
			<span class="sp_3">{{item.CreateTime}}</span>
			<image class="img" :src="item.IconUrl" mode=""></image>
		</view>
	</view>
</template>

<script>
	import {
		Kepu
	} from '@/utils/api.js'
	export default {
		data() {
			return {
				pageNo: 1,
				pageSize: 10,
content: '',
				Table_List: []
			}
		},
		methods: {
			detail(item) {
				 this.content = decodeURIComponent(item).replace(/\+style/g, ' style')
				 console.log(this.content);
				uni.navigateTo({
					url: '/page_jiankangdangan/kepu_detail/kepu_detail?content='+ encodeURIComponent(this.content)
				})
			},
			GetTable() {
				Kepu({
					beginTime: null,
					endTime: null,
					pageNo: this.pageNo,
					pageSize: this.pageSize
				}).then(res => {

					res.Data.map(item => {
						item.CreateTime = (item.CreateTime).slice(0, 10)
					})
					console.log(res.Data);
					this.Table_List = res.Data

				})
			}
		},
		mounted() {
			this.GetTable()
		}
	}
</script>

<style scoped lang="scss">
	.page {
		width: 100vw;
		height: 100%;
		position: relative;
		display: flex;
		flex-direction: column;
		overflow: auto;

		.main_box {
			width: 100%;
			height: 200rpx;
			background: #FFFFFF;
			margin-top: 15rpx;
			position: relative;
			border-bottom: 1rpx solid #D9D9D9;

			.sp_1 {
				position: absolute;
				display: inline-block;
				left: 30rpx;
				top: 36rpx;
				width: 374rpx;
				height: 64rpx;
				font-size: 28rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: bold
			}

			;

			.sp_2 {
				display: inline-block;
				position: absolute;
				bottom: 40rpx;
				left: 30rpx;
				width: 200rpx;
				height: 32rpx;
				font-size: 25rpx;
				font-weight: 400;
				color: #A5A5A5;
			}

			.sp_3 {
				display: inline-block;
				position: absolute;
				bottom: 40rpx;
				left: 200rpx;
				width: 200rpx;
				height: 32rpx;
				font-size: 25rpx;
				font-weight: 400;
				color: #A5A5A5;
			}

			.img {
				width: 244rpx;
				height: 140rpx;
				position: absolute;
				top: 34rpx;
				right: 32rpx;
				border: 1rpx solid #A5A5A5;
			}
		}
	}
</style>